package com.shengchao.examstar.rpc.question.api;

import com.shengchao.examstar.rpc.question.req.LearningSummaryReq;
import com.shengchao.examstar.rpc.question.req.SpecialPracticeSummaryReq;
import com.shengchao.examstar.rpc.question.resp.LearningSummaryResp;

import java.util.concurrent.ExecutionException;

/**
 * 学习总结RPC接口
 */
public interface ILearningSummaryRpc {

    /**
     * 生成学习总结
     * 同步方法，会等待AI生成完成
     *
     * @param req 学习总结请求对象
     * @return 学习总结结果
     * @throws ExecutionException 执行异常
     * @throws InterruptedException 中断异常
     */
    LearningSummaryResp generateSummary(LearningSummaryReq req) throws ExecutionException, InterruptedException;


    /**
     * 查询学习总结
     *
     * @return 学习总结结果，如果不存在返回null
     * @throws ExecutionException 执行异常
     * @throws InterruptedException 中断异常
     */
    LearningSummaryResp querySummary(Long userId,Long questionSetId) throws ExecutionException, InterruptedException;
    
}